Added check on asprintf return.
Merge pull request #28 from jan-schreib/master

Added check on asprintf return.