I've encountered such problems many, many times so always advise against non-alphanumerical characters in file names. By coincidence, it was recently with a dot where a web page displayed file names without the jpg extension. While the script writer has been a touch lazy by searching for the character from the start of the file name, rather than using an equivalent reverse search function, I wouldn't argue with his assumption.