Fix bug with temporary directory when building rpms.