use hasattr for attribute checks
use ininstance for type checks

type(x) == y is not safe in the face of inheritance.
remove unused variables and imports

Use pyflake to find these.
Merge pull request #17 from larsmans/minor-fixes

Minor fixes
don't call load_config on import

This makes it impossible to even import the config module when the
config file is not present at the expected location.
Merge pull request #19 from larsmans/dont-load-config

don't call load_config on import