more reliable method to get absolute path.