allow js api to take a path to a file for cleaner encapsulation
Merge pull request #2 from akre54/api-path

Allow API to take a path