OSX: Improve upgrade logic

We now normalize all paths using stringByResolvingSymlinksInPath before
all operations, so we're insensitive to symlinks in the paths. We also
use the built-in path<->URL conversions, making us handle spaces in the
path as well.