refactored rsh_file_stat2() on Windows + code cleanup