Fixes #300: Added tests and fixed invalid path detection
Merge branch 'master' of github.com:thephpleague/flysystem