grab and use current working directory to save renders
added cross-platform code