Fixes

1. Mainly fixes to install-depends so it works on Ubuntu 12.04.
2. refresh.sh will barf if output directory is not already there - so create that directory if not already there.