Made warning message nicer about file permissions, added dir check.