Fix memory leak in *stat calls in _helpers.c
The Python documentation [0] indicates that an 'O' passed to
Py_BuildValue will have its refcount incremented. Since some elements of
the tuple created in stat_struct_to_py are pre-converted in C to
PyObjects, they already have a refcount of 1 - use 'N' to avoid
incrementing it and ensure Python can deallocate them correctly.
[0] https://docs.python.org/2/c-api/arg.html?highlight=py_buildvalue#c.Py_BuildValue
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
(cherry picked from commit
3c57e31f68b3e68bf7053a628fcfd7ccccf217cd)
Tested-by: Rob Browning <rlb@defaultvalue.org>