Warn if not compiling in production mode

Rails now needs to be in production mode for asset precompilation. I've added a warning message and prevented compilation if you're in anything else. See rails/rails#10551 for my rails bug report and discussion.