Rewrite get_recent.py

Now supports proper argument parsing, specifying input file,
exceptions handling and more.