Mount /dev/shm as a tmpfs.

Fixes #1122.