Resolve package.main even if it's a folder not a file. Resolves #2.