Moved precmd and prexec hooks to own file

* Both are used to set the title in terminal
Added hooks for directory based profiles