Refactor source tree.
Migrate locale functions to separate source file.
Integrate with cli-locale, closes #2.