improve untar when using files instead of directories. Specifies behavior on non-existant targets.

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Merge pull request #6661 from tiborvass/tar_untar_file

Improve untar when using files instead of directories. Specifies behavior on non-existant targets.