I had a similar issue on my 03 Jetta (non wagon though). Rear driver side door wouldn't open from inside or outside. What happened was that the release cable that goes from the inside handle to the door lock got unhooked somehow.
What I did was getting another door handle from pick and pull and then I cut the handle on the car a few inches from the right side. I could then pull the smaller piece on the right out of the door and that gave me enough space to insert a hook (made from a metal door hanger) to release the lock. Check out this video for more info: