install.sh: make updates less disruptive
Although there is no way to atomically replace one directory with
another in a POSIX-ish way that works on all platforms, we can
quickly rename the previous one out of the way and then rename the
new one into place.
Instead of the previous hodgepodge updating in place, we now install
into basedir-new, webroot-new and cgibin-new and then rename the old
out of the way and the new into place.
Unfortunately the two renames are not atomic, but they are very
fast and compared to the previous technique should substantially
reduce the window of opportunity for something to be in a non-working
order during an update.
To further reduce the liklihood of something trying to operate during
the brief window of the update, a utility could be created that makes
the library rename function calls consequtively and almost instantly
after one another, but that would only further reduce the window not
eliminate it and so that's left for a future potential update.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>