Added check for host OS.

Check if we are using Linux & select correct syntax for mktemp.
Updated OS check: Darwin is an exception, not Linux.