added print_help() and exit_directory_error() functions