BZ1006506 - File name validation broken
(cherry picked from commit 755d1f16cb0782c0fae7615431bc668c81165175)