Extend xd.tool.shell, ad unittests to it, and integrate nose for Travis CI