Rewrote the dot file/path restriction fix.