Allow a directory to be specified as main

Currently the main key in bower.json can be a file or list of javascript files. This change allows main to point to a directory, useful for requirejs libraries e.g. https://github.com/mout/mout.