Fixes: Path handling, calloc checking...

Added several checks:
- Verify calloc result
- Check number of arguments given.
- Allow parsing a PDF in a different directory