I am afraid, ROS doesn't yet support writing of stage controllers. The stage controllers as wander and lasernoise were compiled into Stage 3.X.X and if you are working with stage/ROS you may not be able to modify the wander code very easily.
However, you may consider working on stage (as a standalone) without ROS, that will allow you to write your own stage controllers. I will always suggest on using stage 3.X.X, as I not acquainted with stage 4.X.X.
PS : sourceforge.net seems down today ! so please be patient
UPDATE
For an alternative to wander, have a look at this document; http://www.cim.mcgill.ca/~yiannis/417/2011/COMP-417Fall2011Assignment1.pdf. However the issue of a wander like algorithm getting stuck in the corners is more or less perpetual, you can slow it down so that the robot scans all possible options before moving forward however that also is bound to get into the narrow corners at some time and it will be a clear trade off with speed.