python3 compatibility, better command line options

This commit adds support for python3, and also makes the config file location configurable
What can potentially throw OSError here?