The missing step is to show that $v_1,\ldots,v_n$ is linearly independent over $k(x)$. So suppose that there exist rational functions $r_1(x),\ldots,r_n(x)$, not all the zero function, such that
$r_1(x) v_1 + \ldots + r_n(x) v_n = 0$.
We may write $r_i(x) = n_i(x)/d(x)$, i.e., let $d(x)$ be a common denominator of the rational functions. Multiplying through by $d(x)$, we get a polynomial dependence relation
$n_1(x) v_1 + \ldots + n_n(x) v_n = 0$.
Now let $N(x)$ be the greatest common divisor of $n_1(x),\ldots,n_r(x)$. (Such things exist since the polynomial ring $k[x]$ has a division algorithm, hence is a Unique Factorization Domain.) Dividing through by $N(x)$, we get, say,
$N_1(x) v_1 + \ldots + N_n(x) v_n = 0$,
with $\operatorname{gcd}(N_1,\ldots,N_n) = 1$. In particular, not all of the $N_i$'s are divisible by $x$, so plugging in $x = 0$ gives a nontrivial linear dependence relation
$N_1(0) v_1 + \ldots + N_n(0) v_n = 0$
over $k$, a contradiction.
In more sophisticated language, we are showing that the extensions $K/k$ and $k(x)/k$ are linearly disjoint. This can be rephrased in terms of tensor products, for instance...but in the end the above proof is the simplest I can think of.
Added: Robin Chapman and Steve D are right: I misread the question and thought that the OP had already worked out that a basis $v_1,\ldots,v_n$ of $K/k$ also spans $K(x)$ over $k(x)$, but in fact this is the hardest part of the argument. As the OP says, it is easy to see that the set of all $k(x)$-linear combinations of the $v_1,\ldots,v_n$ contains all elements of $K[x]$. As Robin says, it is enough to show that this span also contains all elements $\frac{1}{Q(x)}$ with $Q(x) \in K[x] \setminus {0}$, and a nice way to see this is to show that every $Q \in K[x]$ divides some nonzero polynomial $q \in k[x]$, for if $Q(x) g(x) = q(x)$, $\frac{1}{Q} = = \frac{1}{q} \cdot g(x)$.
Robin gives a nice argument for this: essentially he extends the norm map from a finite dimensional field extension to polynomials. I might as well complete my answer, and I might as well do it in a different way, so here goes:
It is enough to assume that $Q$ is irreducible in the UFD $K[x]$, i.e., that $\mathcal{P} = (Q)$ is a prime ideal. Put $\mathfrak{p} = \mathcal{P} \cap k[x]$. In great generality, the restriction of a prime ideal to a subring is again a prime ideal (this is even true for the preimage of a prime ideal under an arbitrary ring homomorphism, and is very easy to show). What we want to show is that $\mathfrak{p} \neq 0$. But $K[x]$ is a free $k[x]$-module of dimension $n = [K:k]$. In particular, the extension $K[x] / k[x]$ is finitely generated as a module, hence an integral extension, and in such an extension any maximal ideal pulls back to a maximal ideal. So $\mathfrak{p}$ is maximal, hence nonzero.
These facts follow immediately from the definition of integral extensions: see e.g. Proposition 160 and Corollary 168 of
http://math.uga.edu/~pete/integral.pdf.
Note that a possible virtue of this argument is that one does not need to treat the separable and inseparable cases differently.