Fix rpmlint warnings
contrib/mercurial.spec:9: W: hardcoded-path-in-buildroot-tag /tmp/build.%{name}-%{version}-%{release}
A path is hardcoded in your Buildroot tag. It should be replaced by something
like %{_tmppath}/%name-root.
contrib/mercurial.spec:31: W: rpm-buildroot-usage %prep rm -rf $RPM_BUILD_ROOT
$RPM_BUILD_ROOT should not be touched during %build or %prep stage, as it will
break short circuiting.
Make rpm spec less explicit
Fixes:
* current buildrpm failing on Fedora because of unexpected zeroconf extensions
* unowned directories hgext/*/
Catch both IOError and OSError, fix regression introduced by
8046f0a070a6