Added permission-denied code

Checks attempt against current position, allows through if OK.
Fixed permission-denied

Actually denies permission now.
Merge pull request #1 from samhealer/untested

Untested