Fix some deprecation warnings

 - `logger.warn` -> `logger.warning`
 - Remove some uses of universal newlines mode.

@itziakos: do you happen to remember why the `'U'` was used in this context?  It looks to me as though it's unnecessary.