Fixed empty file case in modules.file.append()

Lines are simply inserted at the beginning of the file for empty files.