Strip database_name from split chars
If the database name ends with a dot, the split method will return a list with one empty char entry which means that in the case of the dataset name generation we might end up with an empty string and trigger an invalid index error. This patch avoids this by ignoring leading and trailing split chars.