cli: Fix "build" when the basename contains a "."
cli: Fix "build" when the basename contains a "."

Something like "moby-4.10.yml" did not work when invoked
like "moby build moby-4.10".

While at it, also allow .yaml as an extension.

Signed-off-by: Rolf Neugebauer <6fdd1d8677ab4fbcb4df3eff6e190c3298f7f742@docker.com>

linuxkit/linuxkit,deitch/linuxkit,YuPengZTE/linuxkit,justincormack/linuxkit,yankcrime/linuxkit,rn/linuxkit,furious-luke/linuxkit,yankcrime/linuxkit,konstruktoid/linuxkit,justincormack/linuxkit,konstruktoid/linuxkit,konstruktoid/linuxkit,justincormack/linuxkit,deitch/linuxkit,rn/linuxkit,linuxkit/linuxkit,YuPengZTE/linuxkit,linuxkit/linuxkit,justincormack/tool,riyazdf/tool,JohnnyLeone/linuxkit,yankcrime/linuxkit,yankcrime/linuxkit,deitch/linuxkit,furious-luke/linuxkit,djs55/linuxkit,konstruktoid/linuxkit,djs55/linuxkit,justincormack/linuxkit,JohnnyLeone/linuxkit,YuPengZTE/linuxkit,yankcrime/linuxkit,linuxkit/linuxkit,JohnnyLeone/linuxkit,rn/linuxkit,djs55/linuxkit,YuPengZTE/linuxkit,deitch/linuxkit,JohnnyLeone/linuxkit,linuxkit/linuxkit,JohnnyLeone/linuxkit,davefreitag/tool,justincormack/linuxkit,YuPengZTE/linuxkit,YuPengZTE/linuxkit,djs55/linuxkit,konstruktoid/linuxkit,furious-luke/linuxkit,deitch/linuxkit,konstruktoid/linuxkit,rn/linuxkit,rn/linuxkit,djs55/linuxkit,furious-luke/linuxkit,yankcrime/linuxkit,furious-luke/linuxkit,justincormack/linuxkit