Add unittest for bad rootpath.