Fix bug when compiling empty file with no -o flag

Compiling without -o on an empty LaTeX file would cause `os.path.basename` to get called on `None`, resulting in a stack trace.