Try this:
(define (append lst x)
(cond
((null? lst) (cons x '())) ; here's the change
(else (cons (car lst) (append (cdr lst) x)))))
Notice that all proper lists must end in the empty list, otherwise it'll happen what you just experienced. To put it in another way:
(cons 1 (cons 2 3))
=> '(1 2 . 3) ; an improper list
(cons 1 (cons 2 (cons 3 '())))
=> '(1 2 3) ; a proper list