Fix the way to detect absolute path.