fix sanity check
add osdep check for rpm and rpmrebuild
only check for rpmrebuild when its required
style fixes