Started directory-checking

Just committing minor changes, as I'm finishing working on it for now.
May add more later tonight, or just continue tomorrow.