Fix cookie creation in shtk_process_run

"mktemp -t" behaves differently in Linux than in the BSDs and, as a result,
the timeout functionality in shtk_process_run was broken because the cookie
file could not be created.

Fix this by avoiding "mktemp -t" altogether and add a test for when mktemp
fails.

Discovered thanks to Travis CI runs.