This happened indeed. By making the object multiple brick layers high and keeping Sourceblock:GRASS and dontPlace, the road is still only placed in grass and nothing else, but now follows the terrain.
What have I done?
I messed up something with the direction of the branches... (I was testing with 8x8 road pieces)
Currently, I'm testing unstructured roads. These roads start somewhere and will go somewhere random: straight on (biggest probability), left or right (smaller probabilities). I might use that for random railroads. Then I should find a way to auto-generate bridges and stuff like, so the railroad won't stop when it hits a river.
I'd like to use these random roads for towns, but it won't work really well because the randomness will probably mess up road crossings and leave not enough room for buildings. For the town itself, it's more likely that I will use something like in post 26 by Masy, but slightly more random and less square'ish. I will call them structured roads. For different parts of the town (not sure if I'm even going to get that far in the project ) I could use different structures: in an old town centre, the roads should be narrower and closer to each other than in spacious suburbs. (note to self: is a complete city generator not a too huge project?)