add optional filepath parameter to validation function + save function directory check + require paths
Merge pull request #5 from raimon-segura/modify_requires_and_validation_param

add optional filepath parameter to validation function + save & validation functions