Restrict shm_open and shm_unlink to SHMDIR. Fixes bugs 14752 and 15763.