py_db_scrape: fix usage, factor path_to_file, factor pad prefix flagging