add permissions handling, improve "undo" script

set permissions of system files before installing, allowing use of
download from github

improve experimental "undo" script