Fixing diretory checks by script.