Change a lot of prints to use the logging module. Should also remove the need for the "hackish" redirect_output class.