I created a script that randomly orientates an object (while taking into account its current orientation) and moves the object in that direction for a random amount of blender units, thus creating random movement.
The script does not take into account path finding, its just a base that you can work with.
Some things that you may want to add to it are:
-A way to make it so the object does not wander to far away
-Path finding
-Allowing the object to move along slopes.
There is a constraint actuator you could try to use, it can be set to orientation.
I’m not sure how to use it though so you’re going to have to google it.