Update api.cpp

Switched file streams to those that can open non-ANSI file paths (the header file "streams.h" has not yet been committed).