We should handle errors better in internal functions. E.g., see SystemError and Base.IOError. See also how realpath handles non-existent paths.
The worst case scenario is that we seg fault, as we are passing around pointers within C calls. Let's try to avoid this (at the very least) at all costs.