Only write the nginx log file if it doesn't exist.

This is to work around some conflicting permission issues.
Fix jshint warning.