Made plugins, main file and excludes more flexible.

-Enable mapping file extensions to require.js plugins.
-Allow building packages without a main file.
-Explicit excludes generated for the r.js config.

Note: I was unable to run the tests on my machine. There was some sort of infinite console output.