Make buildEmacsPackage even more robust.

Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>