SERVER-16072 improve namespace construction in commands