Improve globbing algorithm. Fixes #439

This fixes bugs in the globbing algorithm so that relative paths ("../foo/**.js") work better. Also, if you choose a directory, we automatically glob all the js files in that directory.