Fix 'purge raw' function in file browser to work on newer cameras with date based image directory names.
Rewrite sections of the file & directory handling code to (hopefully) make it more understandable.
Issue reported by oneaty - http://chdk.setepontos.com/index.php?topic=12105.msg118987#msg118987
Update for file browser 'Purge RAW' changes.
- fix logic to match 1.2 when selecting 'Purge RAW' on the A/DCIM folder
- allow 'Purge RAW' on the A/RAW folder