Added 'hasPath' and some unit tests.