fix thumbnail management and make it working also in debug mode
Merge branch 'master' of https://github.com/GeoNode/geonode