if first arg is file, cd to its dir