Copy contents of dirname result into string to protect against differing implementations
Across Mac and Linux the implementation of dirname differs. At least on Linux it appears to require a copy be kept otherwise the data is lost.
Across Mac and Linux the implementation of dirname differs. At least on Linux it appears to require a copy be kept otherwise the data is lost.