Added permissions check to tab completion.
Refactored method to fix /tex reload command.