Fixed problems with a dots in a filenames - Issue #2875

Fix for #2875