Use /run/shm for temporary directory

Because /dev/shm is not memory file system on Travis.