Speed-up file access by not using lseek

This is related to performance improvments mentionned in #412