Check the file extension before requiring a test.

My vim swap files kept getting caught in the test runner so I made the
change to only load up .js files.
Fix indentation
Merge pull request #134 from koddsson/only-test-js

Only test js