It's hard to tell what's going on with your first test thing because you're not using a monospace font (or something). <tt> tags might help with that?
About maze algorithms, ones reasonable way to go is spanning trees: You take a grid, you enumerate its spanning trees, each spanning tree is a maze. I believe there are reasonably efficient algorithms for doing this kind of thing, although I admit I don't know any computationally efficient ways to do it off the top of my head. Another related way to go is to take a grid and assign random weights to its edges, then find the minimal or maximal spanning tree -- this can definitely be done by standard, efficient algorithms. This approach has some interesting possibilities using natural random models for assigning edge weights. It's a pretty controllable kind of thing. You may want to add some extra edges and prune dead ends from a raw spanning tree to get reasonable maps, so there'd be some experimentation to do...