PEP8 only changes
Added BitBucket support
Fixed basename - it did not support paths with space character correctly