add npm test script

so that Travis can run the tests
add file option

to include the name of the parsed file in every `loc` object