Add test for invocation from subdir
Improve package.json and bower.json resolution