Reads the specified amount of chars and returns them as a binary string.
Adapted from extensions/file.lua