Fix tmp dir creation on OS X without coreutils installed