Refactored and added tests

syncutil.py now performs same action as sync trigger from SublimeText
and can be used as a command line utility
Move util into lib