Changed all prints to use the python logging module.
fixes #10, #18