Fixed dir checking in scm and irc