ff9a90 library: replace all uses of open() with openat().

Authored and Committed by midipix 3 years ago
    library: replace all uses of open() with openat().