Make TrimToPrefix /slightly/ more efficient

Also test for the incredibly unlikely corner-case where the date
pattern is used in the prefix.
Test for a few more corner-cases
bash completion support

Should be fairly full-featured.

Supports one of the shells listed in Issue #51.