Remove . from the beginning of filenames when organising files.  Fixes #4338
Capture this lambda argument by value, since it's a local variable and won't be valid when the outer function exits.