Separate testable functions to separate file

Don't test file that requires sublime, sublime_plugin modules, as these
aren't in testing environment.

Add a couple of basic test cases to ensure things are working.