Document the functions a little better.
Added functions to test file existance.