Make apply-tm more pythonic

- sort imports (first from lorem import ipsum, later import LOREM)
- move data out of methods to keep methods more compact and easier
  to read
- use the new string formatting notation everywhere
- use single quotes whenever possible (mostly to keep consistency)
- keep lines at 80 characters long (not just for easy reading but also
  for easy comparing)
- no need for parentheses on conditions: i.e.
  if small < bigger: instead of if (small < bigger)
- no need to finish lines with semicolon
- use python calls whenever possible (i.e. shutil or os.remove)