FFI and stdio

Added basic FFI wrapper and basic wrapper for stdio.