Fixes #6 by freeing the memory allocated by realpath(const char *, NULL)