Fix bugs in hosts-cache rakefile