Opening it in /etc ensures we don't mv across a device.  Not sure how solaris 9 and ruby behave, but back in the day mv across a device would fail, and even if its supported it falls back to copying which is slow and possibly not atomic.  For editing /etc/passwd I'd prefer to get atomic-at-all-costs since the downside is corrupted /etc/passwd files, which is horrible.