htsp: fix bug causing imagecache file open to crash.