Fixed a problem whereby if a part of the :deploy_to path (e.g., /mnt) is remounted with an attached volume, the code may not deploy properly.

I thought I had fixed this before, but looking at my previous attempt, I have no idea what I was doing.  It looks like I copy-and-pasted something as a template, got sidetracked, and it just so happened that the crap code there worked ina lot of cases.