(Bug 5137) Add stubs for file APIs

This also removes some debugging I had left in (oops), as well
as standardizes the api_ok and api_error methods to be much more
straightforward and easy to use.