Catch invalid path in build method

The server responds with an unuseful message (server error EOF), which
happens because an empty tar file is sent over. So check in the client,
who knows why that's happening and tell the user.
Merge pull request #337 from heewa/catch_invalid_build

Catch invalid path in build method