Use realpath to detect symbolically linked scripts.