used builtin os.path.pardir to obtain parent dir