Add extra filename sanity checking.

Now filenames are checked per-character for alpha/num & .
Where previously they were just excluded for a few bad chars.
Initial checkin of settings.c
Merge pull request #9 from Yeraze/bugfix/CVE-2009-3887

Add extra filename sanity checking.