Fixed an bug in FormatFileName which caused the function to always fail