Add exception for currentDirectoryPath failing

This also changes OFFileManager to use a buffer with getcwd() rather
than depending on the extension that passing NULL as a buffer will
allocate one.