Generalize project directory in 'new_tab()'

Pass directory in as an argument rather than hardcode the directory
within new_tab()