WIP: make moss run on Python 3

Ideally with a single codebase. WIP so we can use travis.