Fix py26 build break, use compat unittest import

Also have to set a flag on the logging module to prevent it from
complaining about our file handler already being closed.