Expand receive file function.

If received file is a path, create directory first, then
receive the file.

Signed-off-by: YunchaoChen <ytu_cyc@126.com>
Merge branch 'master' of https://github.com/YunchaoChen/black-hole