state internal refactoring
State.is_dir?, improved caching
change get behavior, put to_path bugfix