Script works regardless of user ruler preference

Switch ruler preference to pixels at start of script and restores ruler preference to original value at end of script.