Python script that takes a file and puts the lines in reverse order, but can be configured to ignore certain lines