Check for database driver before attempting connection

My suggestion for #4 - keep the imports at the top per convention but flag the success of the import and use the flag later. Also added explicit catch for `ImportError`.