Fix py_compile issue with Ubuntu 13.10.

Python 2.7 in Ubuntu 13.10 (and possibly others? not sure) carries a
patch that causes problems when a program asks py_compile to write .pyc
to /dev/null (as 'dx build' does to syntax check Python files). This
version of Python (rightfully) writes the .pyc to a temporary file so
the complete file can be atomically moved to the real path. However, it
isn't smart enough to do anything different in the special case of
writing to /dev/null, and crashes because it tries to write first to the
temp file /dev/null.XXXXXX.

This patch creates an actual temp directory, puts the .pyc files there,
and cleans up the directory afterwards.