Adding the right error check incase of pexpand_head call failure
Adding a check to ensure that to be pulled headers are in buffer
Merge pull request #3 from divakardhar/master

Adding the right error check incase of pexpand_head call failure