epedev-340 bug fix

add file_prepare_directory function to create directory if it doesn't
exists