strip illegal unix path name chars and reduce maxdistmins to 20