fork command should add hooks from LOCAL_CODE if defined
create command should think of default roles also...

Some code is duplicated from 'set-default-roles' trigger but it's the
cleanest way to fix the problem.
check file/dir existence before locking

check for existence of the object across all branches before creating
the lock.  Helps catch silent typos which may make people think they
locked the file but actually did not.

[code and commit message somewhat edited by committer]