Update makepath to remove PATH_MAX usage