EDIT
The code for styling the default directory listing is in the file net/base/dir_header.html and ends up in chrome.pak
and chrome_100_percent.pak
.
The python module data_pack.py can work with these files.
If you want to filter certain file types from the list, you can probably do that in addRow()
You will have to use os.chdir() to change the current directory for the whole process. AFAIK, WebKit doesn't keep an internal environment for things like the current folder.