Fixed build script with a symlinked sites/default folder.

The upgrade process was broken if the sites/default folder is a symlink.