[settings] Fix dirname call