wget: Improve mkdir handling

If there there isn't a subdirectory to the downloadfilename, this was
failing. This patch avoids that issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>