Fixed a bug when embedding multiple files.

Closes #12.