lots of little fixes to make the scripts work with and without symlinks etc.