Generate correct RRD filenames for nested graphs. Fixes #1224