mmp/pbrt-v2 — pull request #18 by steelman (2014-02-22 16:21:42+00:00)
Title: Make a copy of a filename passed to DirectoryContaining()

According to IEEE Std 1003.1, dirname() MAY modify the received value.
http://pubs.opengroup.org/onlinepubs/009604599/functions/dirname.html