modify getFilename instead of getUrl

There was some misunderstanding about the two functions. The default
getUrl is just some normalization on result of getFilename, and works
well for our purpose here.

getFilename controls the destination of generated files.