correct for trailing slashes on media root