Check the following link: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Directory
You can play with the directory settings modifying the base plan file (extensions_20-baseplan.conf), specifically the context: sub-internal-directory