pkg.main can contain a directory instead of a file

[pg](https://github.com/brianc/node-postgres/) for example has a directory specified in [pkg.main](https://github.com/brianc/node-postgres/blob/master/package.json#L11).