Catch OSError as well
Rename logfiles environment variable

The previous name PYFARM_AGENT_LOGFILES_DIR was slightly ambiguous. It
suggested that it was a setting intended for the agent, which just isn't
true.