Fix console and db command by using shortname

There're some cases that name != shortname. e.g. I have an app called `Blog` and its shortname turns out to be `blog`, which results in a directory not found error.