Exit with exit code 1 when errors occurred

I was using Ophis in a Bourne shell script and was mildly surprised that it always exits with exit code 0, regardless of whether it successfully assembled something or not.

This change makes it exit with exit code 1 if there were errors during assembly or if the output file could not be written.

I accidentally created this branch off of my pyflakes cleanup branch, which I've already got a pull request open for, but it doesn't seem worth going back and changing that at this point, sorry.