Function to get file size. Replace of file_get_contents().