Adding documentation to the rebuild script

Since this was reverted (and I/we now know why) I have added
documentation as to avoid the issue re-occuring in the future.
Merge pull request #124 from fourseven/master

Add in comments for the rebuild.js file, and include support to auto-rebuild on linux as well.