Fixes StringIndexOutOfBoundsException exception when a file with the same filename as the transfered file exists and the filename doesn't contains ".".