Work around a Mac OS X crash.

This should work around a crash we are seeing in Metasploit:
 * https://github.com/rapid7/metasploit-framework/issues/4240

```append_match``` is being called with an incomplete pathname, so the error may be further upstream.