Added extra checks for custom dirs being parents of mysql's data dir.  Removed dead code.