sortfiles: minor fixes after testing on Win.