Fix #1: make mktemp portable