fix viewPath' bug, improve code

assumptive that `path.resolve('/home/www/root', '/usr/view')`, it is a bug.