fix CHEF-4934
mend
rewrite in the style of remote_directory
fix bug
modify test for the changes of route.rb