Fixing up tmp_dir and event_kwargs

The small part of this patch is changing kwargs to event_kwargs where appropriate.

The larger part is fixing up the `tmp_dir` setting, so that it doesn't mess up `/tmp/` if it's configured.