pylib: set the proper umask before creating a new distro

See issue:
https://github.com/rocksclusters/base/issues/1
pylib: fix missing import in database

This missing import was failing to load the database name at line 143
which failed connection to the DB from all the nodes.

Changed the generic except: into something more stringent
except AttributeError: for easier debugging