I am very sure I ran into the same issue when writing the phatdac script on Raspbian (Jessie) too. The workaround is indeed to create the asound file in another place then move it with mv. Try:
sudo echo -e "pcm.! \bdefault {\n type hw card 0\n}" > ~/asound.conf
sudo echo -e "ctl.! \bdefault {\n type hw card 0\n}" >> ~/asound.conf
sudo mv ~/asound.conf /etc/asound.conf
Edit: this is a full replacement for Step 3 described in learn portal, lifted from script tested in Raspbian, untested anywhere else, but should work elsewhere. If you prefer you can use nano, creating the file in your home directory, before moving it in place.