Locks && fixes

Added debug function dump_open_flags
Added error numbers and needed files
Buffer types changed (u8_t *, char * => void *)
File part lock implementation
Removed free_fd (dublicate code)
Added test vfs_lock
Replace dir => dire
Permission bits && path searching

Moved PERM macro
Expanded permission bit mask with file type
Added debug function dump_perm_mask
Added chdir test
Started getwd
Started vfs_path function