Support alpha channels in img/draw.

Also add an error check to the file module and switch to unix-style
newlines.

I had always meant to consistently use unix-style newlines, but, working
in windows, some other-style newlines seem to occasionally get in there.