MOSYNC-3061: Replaced all -1 occurrences of calls to getMemorySlices to ones with the exact amount of bytes
MOSYNC-5: Added fix to avoid infinite file traversal on windows