Check for publishing permissions before allowing publish

Resolves #66