Remove typecasting.

'filename' is already a string so it's silly to attempt to typecast a
string into a string.