Set 'IRAFARCH' environment variable to 'linux64'
Use set -u
Use set -x
Fix reference to undefined variable — it's $CWD, not $PWD
Fix IRAF installation on Travis CI

Unfortunately, after commit cb10761025f85c065ff51d6d IRAF is still not
working in the Travis build, but these small fixes should hopefully be
enough. Thanks to Piotr Sarnacki, from the Travis CI support team, for
booting a debug virtual machine for me to SSH into, saving me many,
many hours of work and a couple of headaches.

This merges branch 'travis-build-fixes'