Fix issue #401: only load .js files from the migrations directory

For the record tests are failing, but they were failing when I forked the repo so it's not my fault. I tested migrations manually and this patch does indeed work as expected.