HTMLDirectoryElement should be 'dir'. Fix #1159

@Ms2ger?