Changed resolved_path to NULL so realpath() uses malloc to allocate a buffer.