Helper function to return absolute path in directory list