Learn how to remove all duplicate lines from a text file in Python. The program will remove all duplicate lines from an input file and write it to an output file. Also learn how to handle exceptions for invalid file path.