Make rpmbuild test more general

Make it work for more system types
Do not delete files if the build fails