Add support for dependencies

Hi,

I made it possible to define UMD dependencies. The solution is fairly customizable and optional by default. While at it I changed the plugin to use Handlebars for compiling, added a demo and made it give an error in case globalAlias is not provided.

You can see the improved plugin in action at [colorjoe](https://github.com/bebraw/colorjoe).