Mac OS X: Fix empty lines between entries

- Was due to stat appending \n after its output on Mac.
- The fix is strip()ing the string output of stat, which removes leading and trailling whitespace.
Mac OS X: Fix stat output to match the output of Linux

This is not tested yet, was written blindly as I have no Mac as Apple thinks its a good idea to not allow developers to easily download a copy of their OS for running it inside of VMs without buying their hardware.