This is something I extracted from a plugin I wrote years ago, proj.vim. It is sometimes quite useful to be able to set a different working directory in a tab on the fly, particularly if you use tools that default to the working directory, such as NERD_Tree.vim.
Please report issues on Github.