Fix globbing issues and use an improved method to check tarball in argument