Change to the real script directory.

Instead of changing to the pre/post-up/down directories, when a script
is executed, the current directory is changed to the real directory of
the script.  This way, if the item under the directory is a symbolic
link to a script elsewhere, the directory will be changed to that
directory instead.