Update autofilename.py

When using 'afn_use_keybinding' = true option the autocomplete popup still is opened inside any string and it is quite distracting. I have tried to fix this, though I am not sure if it  is okay to query settings value on every modification.