Added an 'hdu' option to filter by hdu, and added a command-line script

These should probably be in two independent PRs, but the script is sort of harmless.  I use it all the time, figured it might be useful to others.