How would I prepend 127.0.0.1 as a nameserver all the time

As you already know, OS X will overwrite any changes you make to /etc/resolv.conf so you can't really specify your own nameserver in there. Luckily, there is a way to add your own resolver entries in a way that will persist whatever network connection you use whilst still using DHCP assigned name servers for most normal lookups.

Create the directory /etc/resolver and create a text file within it that simply has a standard name server directive like nameserver 127.0.0.1. Make sure this text file is named the same as the domain or TLD you wish to use dnsmasq for. In my case, all my development sites end with the .dev TLD so my config file is named /etc/resolver/dev.

And that's it! From now on, when ever you connect to a network using DHCP, your name servers will be automatically assigned and used as normal but any requests for your specified TLD (*.dev in my example) will be routed to dnsmasq.