Several updates to this script where I add support for setting a maximum file age and a verbose flag for troubleshooting. Also probably cleaned up some code and fixed some bugs. Re-indented with spaces instead of tabs.