Added support for filename detection in cases where we're redirected.