Added optimization that if the site.js file already exists then don't write out a new one if there are no changes to what's output - should reduce needless updates