Fixed thumbnail generating

Migrating to PHP5.6 revealed that thumbnail generating used relative
paths instead of absolute paths.