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

Since this was reverted (and I/we now know why) I have added
documentation as to avoid the issue re-occuring in the future.