Fixes SyntaxError (EOF) when code is empty

This should close #30 (even though #30 refers to a EOFError, I can't
reproduce that specific error type and so have chosen not to catch it).