Get multi-platform tmp dir

When using platforms where "/tmp" wasn't the default temp directory AND
you wouldn't define a specific `tmp` directory the middleware would
throw an error.
Merge pull request #41 from Dudemullet/master

Get multi-platform tmp dir