Fallback to pwd if realpath is not available