How about `app_root = os.path.dirname(parser.input_path)`?