Henrik,
You can take that testing code out, the path is not the problem, the sate used for the input is the problem
The code you have is looking using a date like this [year][month][day]: 2008301 (notice the month you have is [3], it should be [03]
It is supposed to be like this: 20080301
The date is used to put together the image file name, but the missing a zero before the 3 makes it incorrect
2008301.gif instead of 20080301.gif
now the question remains why is the date for month missing a zero?